package com.wunong.smart.collection.starter.infrastructure.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.wunong.smart.domain.platform.entify.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 收藏Domain
 *
 * @author create by zealot.zt
 */
@Getter
@Setter
@ToString(callSuper = true)
@Entity
@Table(name = CollectionPO.TABLE_NAME)
@TableName(value = CollectionPO.TABLE_NAME)
public class CollectionPO extends BaseEntity {

    public static final String TABLE_NAME = "collection";

    /**
     * 业务编号
     */
    @Column(nullable = false)
    private String bizId;

    /**
     * 业务编号类型
     */
    @Column(nullable = false)
    private Integer bizType;

    /**
     * 收藏用户编号
     */
    @Column(nullable = false)
    private Long userId;

    /**
     * 收藏用户角色
     */
    @Column(nullable = false)
    private Integer userRole;

    /**
     * 收藏状态
     *
     * @see com.wunong.smart.collection.client.enums.CollectionStatusEnum
     */
    @Column(nullable = false)
    private Integer status;

    /**
     * 收藏类型
     */
    @Column(nullable = false)
    private String collectType;

    public static CollectionPO of() {
        return new CollectionPO();
    }

}
